﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using TeamWPF.Reports;

namespace TeamWPF
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Logging loggingWindow = new Logging();
            loggingWindow.ShowDialog();
        }

        public void OnUnload_Click(object sender, RoutedEventArgs e)
        {
            Simulator.Simulator.UnloadTransportUnits(false);
        }

        public void OnFreight_Click(object sender, RoutedEventArgs e)
        {
            if (sender as MenuItem == FreightAll)
            {
                Simulator.Simulator.LoadTransportUnits(true);
            }
            else
            {
                Simulator.Simulator.LoadTransportUnits(false);
            }
        }

        private void OnNewFreight_Click(object sender, RoutedEventArgs e)
        {
            FirstMenu clientChoice = new FirstMenu();
            clientChoice.ShowDialog();
        }

        private void Reports_Click(object sender, RoutedEventArgs e)
        {
           Reports.ReportsWindow reportWindow = new Reports.ReportsWindow();
            reportWindow.ShowDialog();
        }


        private void Register_Click(object sender, RoutedEventArgs e)
        {
            RegisterMenu registerChoice = new RegisterMenu();
            registerChoice.ShowDialog();
        }
    }

}
